import 'package:get/get.dart';


class NewsDetailController extends GetxController {
  final detail = Rx<dynamic?>(null);
  late RxInt id = 0.obs ;
    late RxString createTime= ''.obs ;
    late RxString content= ''.obs ;
     late RxString title= ''.obs ;
        late RxString labelName= ''.obs ;
  @override
  void onInit() {
    super.onInit();
    id.value = Get.parameters['id'] ?? Get.arguments['id'];
    createTime.value = Get.parameters['createTime'] ?? Get.arguments['createTime'];
     title.value = Get.parameters['title'] ?? Get.arguments['title'];
    //  final contexts =   Get.parameters['content'] ?? Get.arguments['content'];
    content.value = Get.parameters['content'] ?? Get.arguments['content'];
     labelName.value = Get.parameters['labelName'] ?? Get.arguments['labelName'];
    // getNewsDetail(id);
  }
  
  // void getNewsDetail(id) {
  //   http.netFetch<dynamic>(
  //     '',
  //     params: {
  //       'id': id,
  //     },
  //     success: (result) {
  //       detail.value = result.data;
  //     },
  //   );
  // }
}
